//
//  CMDBMovieStaffCollectionHeaderView.swift
//  CMDB
//
//  Created by 曹桂祥 on 2017/5/9.
//  Copyright © 2017年 CMDB. All rights reserved.
//

import UIKit

class CMDBMovieStaffCollectionHeaderView: UICollectionReusableView {
    
    var textLabel : UILabel = UILabel()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setupHeaderView()
        
        setupSubviews()
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}


extension CMDBMovieStaffCollectionHeaderView{
    
    func setupHeaderView(){
        
        backgroundColor = UIColor.clearColor()
        
    }
    
    func setupSubviews(){
        
        addSubview(textLabel)
        
        textLabel.text = "导演组"
        
        textLabel.textAlignment = .Center
        
    }
}

extension CMDBMovieStaffCollectionHeaderView{
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        textLabel.frame = CGRect(x: 0, y: 0, width: CGRectGetWidth(bounds), height: CGRectGetHeight(bounds))
    }
    
}

